#ifndef _LED_H__
#define _LED_H__
#include "os/types.h"
typedef void (*led_func)(bool );

#define CONFIG_DEF_ON_DURATION 50
#define CONFIG_DEF_OFF_DURATION 50

typedef struct {
	u32 ts_laston;
	u32 ts_lastoff;
	u32 on_duration;
	u32 off_duration;
	bool on;
	led_func handler;
}led_t;

void led_init(led_t *led, led_func handler);
void led_set_duration(led_t *led, u32 on, u32 off);
void led_on(led_t *led);
void led_process(led_t *led);
#endif /* _LED_H__ */

